<me:SDBASE x:Class="WPFExcelReport.K8872"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
                    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"     
                     xmlns:me="clr-namespace:WPFExcelReport"  
                    xmlns:Localization="clr-namespace:Localization;assembly=Localization" 
                    xmlns:WF="clr-namespace:WPFExcelReport;assembly=TICC_WFEVENTS"  
                    x:Name="TV"
                    Loaded="Window_Loaded"
     >
    <me:SDBASE.Resources>
        <CollectionViewSource  x:Key="vwMaster"/>       <CollectionViewSource  x:Key="vwDetail"/>
        <ucd:BoolToVisibilityConverter  x:Key="bv"/>
        <ucd:NOTBoolToVisibilityConverter x:Key="nbv"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
        <ucd:TextTrimmingConverter x:Key="trim"/>
    </me:SDBASE.Resources>
    <WrapPanel>
        <WF:TBTNEXE IsManage="{Binding IsManage,ElementName=TV}" DLL="TSDDAT" CMD="TSD02" STWNW="MainWindow" KRS="{Binding SDSA,ElementName=TV}"  
                    IsInfo="{Binding IsBTNInfo,ElementName=TV}"   INFO="复板状态:" />
        <ComboBox   DropDownOpened="ComboBox_DropDownOpened" 
            Visibility="{Binding IsCombo,ElementName=TV,Converter={StaticResource bv}}"
             Width="Auto"  
             SelectedValuePath="KEY"
             DisplayMemberPath="SDES"
             ItemsSource="{Binding Source={StaticResource ResourceKey=vwMaster}}"  
             IsSynchronizedWithCurrentItem="True" 
             ScrollViewer.HorizontalScrollBarVisibility="Visible"
            >
        </ComboBox>
        <ListBox    ItemsSource="{Binding Source={StaticResource ResourceKey=vwMaster}}"  
                     Visibility="{Binding IsCombo,ElementName=TV,Converter={StaticResource nbv}}"
                                ScrollViewer.CanContentScroll="True">
            <ListBox.ItemsPanel>
                <ItemsPanelTemplate>
                    <WrapPanel  MaxWidth="800"/>
                </ItemsPanelTemplate>
            </ListBox.ItemsPanel>
            <ListBox.ItemTemplate>
                <DataTemplate>
                    <Grid Width="100">
                        <Grid.RowDefinitions>
                            <RowDefinition/>
                            <RowDefinition/>
                        </Grid.RowDefinitions>
                        <TextBlock Grid.Row="0" Text="{Binding Path=SDES}"/>
                        
                    </Grid>
                </DataTemplate>
            </ListBox.ItemTemplate>
        </ListBox>
        <TextBlock Text="{Binding SDES, Source={StaticResource ResourceKey=vwMaster}}"  
                   Width="60" Visibility="Collapsed"
                   />
    </WrapPanel>
</me:SDBASE>
